import http from '@/utils/request'
const URL = '/pigeon/t-out-slaughterhouse-bill';

// 获取主体表格数据
export function getAllInfoByPage(current,  limit) {
  return http({
      url:`${URL}/getPageTO/${current}/${limit}`,
      method: 'get',
  })
}

// 根据批次号查询数据
export function getInfoByBatch(current,limit,id) {
  return http({
      url:`${URL}/list_out/${current}/${limit}/${id}`,
      method: 'get',
  })
}

//通过id删除订单
export function deleteOrder(id) {
  return http({
  url: `${URL}/deleteTsById/${id}`,
  method:'delete'
})
}



//提交入库单
export function AddOrder(data) {
  return http({
      url:`/pigeon/t-out-slaughterhouse/saveTs`,
      method: 'post',
      data
  })
}

// 通过id展示订单信息
export function showDetails(id,current,pageSize) {
  return http({
  url: `${URL}/pageTOut/${id}/${current}/${pageSize}`,
  method:'get'
})
}
